import { Router } from 'express';
import { messageAppController } from './appController';

const router = Router();

// 获取消息列表 - 包含未读消息数量
router.get('/list', messageAppController.getUserMessages.bind(messageAppController));

// 获取未读消息数量(简化版)
router.get('/unread-count', messageAppController.getSimpleUnreadCount.bind(messageAppController));

// 获取未读消息详细统计
router.get('/unread-stats', messageAppController.getUnreadStats.bind(messageAppController));

// 标记单个消息为已读
router.put('/read/:messageId', messageAppController.markMessageAsRead.bind(messageAppController));

// 标记全部消息为已读
router.put('/read-all', messageAppController.markAllMessagesAsRead.bind(messageAppController));

// 删除消息
router.delete('/:messageId', messageAppController.deleteMessage.bind(messageAppController));

export default router; 